package com.greenline.push.dal.pushcenter.impl;

import com.greenline.push.dal.base.BaseDAO;
import com.greenline.push.dal.pushcenter.MsgHisDao;
import com.greenline.push.dal.pushcenter.dataobject.MsgHisDO;
import com.greenline.push.dal.query.MsgHisQuery;

public class MsgHisDaoImpl extends BaseDAO implements MsgHisDao {

    /*
     * (non-Javadoc)
     * 
     * @see com.greenline.push.dal.pushcenter.GroupUserDao#insert(com.greenline.
     * push.dal.pushcenter.dataobject.groupUserDO)
     */
    @Override
    public Long insert(MsgHisDO msgHisDO) {
        return (Long) super.getSqlMapClientTemplate().insert("msgHis.insert", msgHisDO);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.greenline.push.dal.pushcenter.groupUserDAO#getgroupUserById(java
     * .lang.Long)
     */
    @Override
    public MsgHisDO getById(Long id) {
        return (MsgHisDO) super.getSqlMapClientTemplate().queryForObject("msgHis.find_by_id", id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.greenline.push.dal.pushcenter.groupUserDAO#update(com.greenline.
     * push.dal.pushcenter.dataobject.groupUserDO)
     */
    @Override
    public int update(MsgHisDO msgHisDO) {
        return super.getSqlMapClientTemplate().update("msgHis.update", msgHisDO);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.dal.pushcenter.groupUserDAO#listByQuery(com.greenline
     * .push.dal.query.groupUserQuery)
     */
    @Override
    public MsgHisQuery listByQuery(MsgHisQuery query) {
        return (MsgHisQuery) super.listByQuery("msgHis.list_by_query", query);
    }

    @Override
    public int deleteById(Long id) {
        return super.getSqlMapClientTemplate().update("msgHis.delete", id);
    }

}
